'\" t
.TH "SD_BUS_INTERFACE_NAME_IS_VALID" "3" "" "systemd 249" "sd_bus_interface_name_is_valid"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
sd_bus_interface_name_is_valid, sd_bus_service_name_is_valid, sd_bus_member_name_is_valid, sd_bus_object_path_is_valid \- Check if a string is a valid bus name or object path
.SH "SYNOPSIS"
.sp
.ft B
.nf
#include <systemd/sd\-bus\&.h>
.fi
.ft
.HP \w'int\ sd_bus_interface_name_is_valid('u
.BI "int sd_bus_interface_name_is_valid(const\ char*\ " "p" ");"
.HP \w'int\ sd_bus_service_name_is_valid('u
.BI "int sd_bus_service_name_is_valid(const\ char*\ " "p" ");"
.HP \w'int\ sd_bus_member_name_is_valid('u
.BI "int sd_bus_member_name_is_valid(const\ char*\ " "p" ");"
.HP \w'int\ sd_bus_object_path_is_valid('u
.BI "int sd_bus_object_path_is_valid(const\ char*\ " "p" ");"
.SH "DESCRIPTION"
.PP
\fBsd_bus_interface_name_is_valid()\fR
checks if a given string
\fIp\fR
is a syntactically valid bus interface name\&. Similarly,
\fBsd_bus_service_name_is_valid()\fR
checks if the argument is a valid bus service name,
\fBsd_bus_member_name_is_valid()\fR
checks if the argument is a valid bus interface member name, and
\fBsd_bus_object_path_is_valid()\fR
checks if the argument is a valid bus object path\&. Those functions generally check that only allowed characters are used and that the length of the string is within limits\&.
.SH "RETURN VALUE"
.PP
Those functions return 1 if the argument is a valid interface / service / member name or object path, and 0 if it is not\&. If the argument is
\fBNULL\fR, an error is returned\&.
.SS "Errors"
.PP
Returned errors may indicate the following problems:
.PP
\fB\-EINVAL\fR
.RS 4
The
\fIp\fR
parameter is
\fBNULL\fR\&.
.RE
.SH "NOTES"
.PP
These APIs are implemented as a shared library, which can be compiled and linked to with the
\fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
file\&.
.SH "SEE ALSO"
.PP
\fBsystemd\fR(1),
\fBsd-bus\fR(3),
\fBsd_bus_call_method\fR(3)
